﻿using ProTrack.Entity;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace ProTrack.IServices.Plans
{
    /// <summary>
    /// 排班计划业务逻辑层接口
    /// </summary>
    public interface IPlanTeamServices
    {
        /// <summary>
        /// 获取所有排班计划信息
        /// </summary>
        /// <returns></returns>
        public Task<IEnumerable<PlanTeam>> GetAllAsync();
        /// <summary>
        /// 根据页码，页大小，班组分类，排班编号，排班名称获取排班信息
        /// </summary>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页大小</param>
        /// <param name="TeamType">班组分类</param>
        /// <param name="PlanCode">排班编号</param>
        /// <param name="PlanName">排班名称</param>
        /// <returns></returns>
        public Task<IEnumerable<PlanTeam>> GetAsync(int PageIndex, int PageSize, string TeamType, string PlanCode, string PlanName);
        /// <summary>
        /// 根据班组分类，排班编号，排班名称获取总条数
        /// </summary>
        /// <param name="TeamType">班组分类</param>
        /// <param name="PlanCode">排班编号</param>
        /// <param name="PlanName">排班名称</param>
        /// <returns></returns>
        public Task<int> GetCountAsync(string TeamType, string PlanCode, string PlanName);
        /// <summary>
        /// 根据排班计划编号获取排班计划人员表(排班计划附加表)
        /// </summary>
        /// <param name="PlanCode">排班计划编号</param>
        /// <returns></returns>
        public Task<IEnumerable<PlanTeamItem>> GetPlanTeambyIdAsync(string PlanCode);
        /// <summary>
        /// 更新排班计划
        /// </summary>
        /// <param name="model">排班计划模型</param>
        /// <param name="list">排班计划人员表(排班计划附加表)模型</param>
        /// <returns></returns>
        public Task<bool> UpdateAsync(PlanTeam model, List<PlanTeamItem> list);
        /// <summary>
        /// 新增排班计划
        /// </summary>
        /// <param name="model">排班计划模型</param>
        /// <param name="list">排班计划人员表(排班计划附加表)模型</param>
        /// <returns></returns>
        public Task<bool> AddAsync(PlanTeam model, List<PlanTeamItem> list);
        /// <summary>
        /// 根据编号批量删除排班信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<bool> DeleteAsync(int[] id);
        /// <summary>
        /// 根据编号删除指定排班信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<bool> DeleteAsync(int id);
    }
}
